﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LockCrypt.Core;

namespace LockCrypt.DAL {
    public class NullDbProvider :IDbProvider {
        private readonly IEncryptionService _encryption;
        public string FileName {
            get {return null;}
            set {
                throw new NotImplementedException();
            }
        }

        public IEncryptionService Encryption {
            get { return _encryption; }
        }

        public Constants.DatabaseType DatabaseType {
            get { throw new NotImplementedException(); }
        }

        public bool IsConnected { get { return false; } }

        public bool CanAttemptConnection { get { return false; } }

        public string ConnectionString { get { return string.Empty; } }

        public string FormattedName { get { return string.Empty; } }

        public NullDbProvider() {
            _encryption= new NullEncryptionService();
        }

        public bool CheckPassword() {
            return false;
        }

        public void AddAccounts(IEnumerable<IAccount> accounts, ILogProvider logger) {}

        public void EditAccount(IAccount account) {}

        public void DeleteAccount(string accountId) {}
        
        public void DeleteAccounts(IEnumerable<string> accountIds) {
        }

        public List<IAccount> GetAccounts() {
            return new List<IAccount>();
        }

        public void AddGroups(IEnumerable<IGroup> groups, ILogProvider logger) {}

        public void EditGroup(IGroup group) {}

        public void DeleteGroup(IGroup group) {}

        public void DeleteGroups(IEnumerable<string> groupIds) {
        }

        public List<IGroup> GetGroups() {
            return new List<IGroup>();
        }

        public void AddTemplates(IEnumerable<ITemplate> templates, ILogProvider logger) {}

        public void EditTemplate(ITemplate template) {}

        public void DeleteTemplate(string templateId) {}

        public List<ITemplate> GetTemplates() {
            return new List<ITemplate>();
        }

        public List<ITemplate> GetTemplatesByName(string templateName) {
            return new List<ITemplate>();
        }

        public void CreateDatabase() {}

        public void ClearDatabase() {}

        public DatabaseContents ReadDatabase() {
            return null;
        }
        public void ImportDatabase(DatabaseContents contents, ILogProvider logger) {}

        public void ChangePassword(string newPassword) {
        }
    }
}
